import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';

class Toast {
  static initConfig() {
    EasyLoading.instance..indicatorType = EasyLoadingIndicatorType.wave;
  }

  static TransitionBuilder build({TransitionBuilder? builder}) {
    return EasyLoading.init();
  }

  static show(String msg) {
    EasyLoading.showToast(msg);
  }

  static showNotification(String msg) {
    EasyLoading.showInfo(msg);
  }

  static loading() {
    EasyLoading.show(status: '加载中...');
  }

  static dismiss() {
    EasyLoading.dismiss();
  }

  static isExist() {
    return EasyLoading.isShow;
  }
}
